<!-- 
    全屏组件
    实现全屏显示功能
 -->
<template>
    <div class="full-screen">
        <i @click="screenFull" class="iconfont icon-Fullscreen full"></i>
    </div>
</template>
<script lang="ts" setup>
import screenfull from 'screenfull'//全屏插件
const screenFull = () => {//全屏事件
    if (screenfull.isEnabled) { //isEnabled:判断是否支持全屏
        screenfull.toggle() //toggle():切换全屏
    }
}
</script>
<style lang="less" scoped>
.full-screen {
    display: inline-block;
    transform: translateY(20%);
    i {
        cursor: pointer;
        font-size: 20px;
        margin: 0px 10px;
    }
}
</style>

